package org.grottarossa.ui.core.controls.skiptask;

import java.util.ResourceBundle;

import org.grottarossa.ui.core.ApplicationSession;
import org.grottarossa.ui.core.FormFieldLocation;
import org.grottarossa.ui.core.FormFieldProperties;
import org.grottarossa.ui.core.Notifier;
import org.grottarossa.ui.core.base.BaseForm;
import org.grottarossa.ui.core.controls.deadline.DeadLinFieldFactory;

import com.vaadin.terminal.Sizeable;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Field;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;


/***
 * Maschera di skip task
 * @author 
 *
 */
public class SkipTaskForm extends BaseForm
{
	public SkipTaskForm(ApplicationSession appSession, ResourceBundle localizer)
	{
		super(appSession);
		m_layout = new GridLayout(1, 2);
		m_layout.setWidth(100, Sizeable.UNITS_PERCENTAGE);
		setLayout(m_layout);

		FormFieldProperties fieldProperties = new FormFieldProperties(new FormFieldLocation(0, 0));
		fieldProperties.setReadonly(true);
		m_fieldsProperties.put("taskname", fieldProperties);
		fieldProperties = new FormFieldProperties(new FormFieldLocation(1, 0));
		m_fieldsProperties.put("comment", fieldProperties);

		setWriteThrough(true);
		setImmediate(true);
	    setFormFieldFactory(new SkipTaskFieldFactory(appSession, localizer));
	}
}
